home *** CD-ROM | disk | FTP | other *** search
/ Power Programmierung 2 / Power-Programmierung CD 2 (Tewi)(1994).iso / gnu / gnulib / sipp / srgp / src / srgp_cur.c < prev    next >
Encoding:
C/C++ Source or Header  |  1992-09-01  |  1.1 KB  |  62 lines

  1. #include "HEADERS.h"
  2. #include "srgplocal.h"
  3.  
  4.  
  5. void
  6. SRGP_loadCursor (int index, int shape)
  7. {
  8.    DEBUG_AIDS{
  9.       SRGP_trace (SRGP_logStream, "SRGP_loadCursor %d %d\n", index, shape);
  10.       srgp_check_system_state();
  11.       srgp_check_cursor_index(index);
  12.       LeaveIfNonFatalErr();
  13.    }
  14.  
  15. #ifdef X11
  16.    srgp__cursorTable[index] = XCreateFontCursor (srgpx__display, shape);
  17. #endif
  18.  
  19. #ifdef THINK_C
  20.    srgp__cursorTable[index] = GetCursor (shape);
  21. #endif
  22.  
  23. #ifdef GRX
  24.    srgp__cursorTable[index] = srgp__cursorTable[0];
  25. #endif
  26.  
  27.    SRGP__updateLocatorCursorShape ();
  28. }
  29.  
  30.  
  31.  
  32.  
  33. #ifdef THINK_C
  34. #define cursortype CursHandle
  35. #endif
  36. #ifdef X11
  37. #define cursortype Cursor
  38. #endif
  39. #ifdef GRX
  40. #define cursortype GrCursor *
  41. #endif
  42.  
  43. void SRGP__initCursorTable (void)
  44. {
  45.    register i;
  46.  
  47.    for (i=0; i<=MAX_CURSOR_INDEX; i++)
  48.       srgp__cursorTable[i] = (cursortype)NULL;
  49.  
  50. #ifdef THINK_C
  51.    srgp__cursorTable[0] = (CursHandle)(-1);
  52.         /* special value representing the arrow cursor */
  53. #endif
  54.  
  55. #ifdef GRX
  56.    MouseInit();
  57.    MouseSetColors(GrAllocColor(255,0,0),GrBlack());
  58.    srgp__cursorTable[0] = MouseGetCursor();
  59. #endif
  60.  
  61. }
  62.